/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MODEL;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ahmed
 */
@Embeddable
public class CaracteriserPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ID_ITEM")
    private BigDecimal idItem;
    @Basic(optional = false)
    @Column(name = "ID_CAR")
    private BigDecimal idCar;

    public CaracteriserPK() {
    }

    public CaracteriserPK(BigDecimal idItem, BigDecimal idCar) {
        this.idItem = idItem;
        this.idCar = idCar;
    }

    public BigDecimal getIdItem() {
        return idItem;
    }

    public void setIdItem(BigDecimal idItem) {
        this.idItem = idItem;
    }

    public BigDecimal getIdCar() {
        return idCar;
    }

    public void setIdCar(BigDecimal idCar) {
        this.idCar = idCar;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idItem != null ? idItem.hashCode() : 0);
        hash += (idCar != null ? idCar.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CaracteriserPK)) {
            return false;
        }
        CaracteriserPK other = (CaracteriserPK) object;
        if ((this.idItem == null && other.idItem != null) || (this.idItem != null && !this.idItem.equals(other.idItem))) {
            return false;
        }
        if ((this.idCar == null && other.idCar != null) || (this.idCar != null && !this.idCar.equals(other.idCar))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "MODEL.CaracteriserPK[ idItem=" + idItem + ", idCar=" + idCar + " ]";
    }
    
}
